//导入vueRouter包
import VueRouter from 'vue-router'
//导入对应的路由组件
import homeContainer from './components/tabbar/HomeContainer.vue'
import memberContainer from './components/tabbar/MemberContainer.vue'
import shopcarContainer from './components/tabbar/ShopCarContainer.vue'
import searchContainer from './components/tabbar/SearchContainer.vue'
import newsList from './components/news/NewsList.vue'
import newsInfo from './components/news/NewsInfo.vue'

//创建路由对象

var router = new VueRouter({
        routes: [//配置路由规则
                { path: '/', redirect: '/home' },
                { path: '/home',component: homeContainer},
                { path: '/member', component: memberContainer },
                { path: '/shopcar', component: shopcarContainer },
                { path: '/search', component: searchContainer },
                { path: '/home/newslist', component: newsList },
                { path: '/home/newsinfo/:id', component: newsInfo },

        ],
        linkActiveClass: 'mui-active'//覆盖默认路由的高亮显示，默认的类是router-link-active
})

export default router